package com.yidu.InventoryManagement.service;

import com.yidu.CashManagement.entity.FundsAllot;
import com.yidu.InventoryManagement.entity.*;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 梁俊
 * @date 2022/12/12
 * &@version 1.0
 */
@Service
public interface ShouYiZhiFuService {
    public List<XianJinLiXi> selectShouYiZhiFu(String date1,String date, int page, int limit);

    /**
     * 根据日期取现金应收应付库存数据
     */
    public int selectXianJinLiXii(String date);


    /**
     * 删除统计过来现金应收应付重复数据
     * @param businessTime
     * @param businessType
     * @param money
     * @return
     */
    public int deleteCashAccruedd(String businessTime,int businessType,int money);



    /**
     * 债券利息收入点击统计删除统计过来证券应收应付重复数据
     * @param businessTime
     * @param businessType
     * @param money
     * @return
     */
    public int deletesecurityAccruedd(@Param("businessTime") String businessTime,@Param("businessType") int businessType,@Param("money") int money);


    /**
     * 现金利息收入点击统计删除统计过来资金调拨重复数据
     * @param businessTime
     * @param businessType
     * @param money
     * @return
     */
    public int deleteZiJingDiaoB(@Param("businessTime") String businessTime, @Param("allotType") int allotType, @Param("allotMoney") int allotMoney);

    public int selectShouYiZhuFuCount(String date);

    public Integer selectShouYiZfuMoney(String date);

    public List<ZaiQuanLiXi> selectZhaiQuan(String date1,String date, int page, int limit);


    /**
     * 取证券应收应付库存数据
     * @return
     */
    public int selectZhaiQuanLixiShour(String date);


    /**
     * 查询债券利息收入昨日金额
     * @param date
     * @return
     */
    public Integer selectZhaiQuanMoney(@Param("date") String date,@Param("securityType") int securityType);


    public int selectZhaiQuanCount(String date);

    public List<ZfulFeng> selectZhiFu(String businessTime, int page, int limit);

    public int insertXianJinLiXi(CashAccrued cashAccrued);

    public String selectDaXianJin();

    /**
     * 添加资金调拨
     * @param
     * @return
     */
    public int insertFundsAllot(FundsAllot fundAllot);

    /**
     * 取资金调拨最大的id
     */
    public String selectZijinDiaoBo();


    /**
     * 取证券应收应付最大的id
     * @return
     */
    public String selectDaZhaiQuanId();

    /**
     * 证券应收应付添加
     * @param securityAccrued 证券应收应付对象
     * @return
     */
    public int insertSecurityAccrued(SecurityAccrued securityAccrued);
}
